<extend name="Common/list-base" />
<block name="action">
     <a class="AjaxHtml btn btn-green btn-big mrt10" data-url="{:U('add')}" href="javascript:;">添加</a>
</block>
<block name="extra">
    <div class="tab">
        <foreach name="Think.config.NAV_GROUPS" key="k" item="v">
        <a href="{:U('index',array('groups'=>$k))}" <eq name="groups" value="$k">class="current"</eq> >{$v}({$k})</a>
        </foreach>
    </div>
</block>
<block name="list">
    <tr>
        <th width="50" class="tc"><input class="CheckAll" type="checkbox"></th>
        <th width="50" class="tc">排序</th>
        <th >导航名称</th>
        <th >地址</th>
        <th >图片</th>
        <th width="80" class="tc">分组</th>
        <th width="50" class="tc">类型</th>
        <th width="50" class="tc">状态</th>
        <th width="200">操作</th>
    </tr>
    <foreach name="list" item="v">
    <tr>
        <td class="tc"><input class="CheckOne" type="checkbox" name="pk[]" value="{$v.id}"></td>
        <td class="tc"><input class="tc" type="text" size="1" name="sort[{$v.id}]" value="{$v.sort}"></td>
        <td>{$v.title}</td>
        <td>{$v.url}</td>
        <td><notempty name="v.image"><a class="AjaxImage" data-url="{$v.image}" href="javascript:;"><img src="{$v.image}" width="100" height="30" /></a></notempty></td>
        <td class="tc">{:int_str($v['groups'],'NAV_GROUPS')}</td>
        <td class="tc">{:int_str($v['type'],'1:链接,2:模块,3:单页')}</td>
        <td class="tc">{:int_str($v['status'],'0:false,1:true')}</td>
        <td>
            <a class="AjaxHtml btn btn-blue mrt10" data-url="{:U('edit?id='.$v['id'])}" href="javascript:;">编辑导航</a>
            <a class="AjaxConfirm btn btn-red mrt10" data-url="{:U('del?id='.$v['id'])}" href="javascript:;">删除导航</a>
        </td>
    </tr>
    </foreach>
</block>

<block name="batch">
<div class="input-group">
    <span class="text-icon"> 批 量 </span>
    <select name="batch">
        <option value="sort">排序</option>
        <option value="del">删除</option>
    </select>
</div>
</block>